<template>
    <div>
        <Card>
            <p slot="title">钉钉微应用配置</p>
            <Row>
                <Col span="8">
                    <input-text label="AppId"></input-text>
                </Col>
                <Col span="8">
                    <input-text label="Secrect"></input-text>
                </Col>
                <Col span="8">
                    <Button type="primary" icon="md-checkmark" @click="handleSaveDingtalk">保 存</Button>
                </Col>
            </Row>
        </Card>
        <Card>
            <p slot="title">日志转发规则</p>
            <Row>
                <Col>
                    <tables ref="tables" search-place="top"
                            v-model="tableData"
                            :columns="columns"
                            :loading="loading">
                        <template slot="action" slot-scope="props">
                            <Switch :value="props.Disabled" @on-change="handleDisableChange(props)"/>
                        </template>
                    </tables>
                </Col>
            </Row>
        </Card>
    </div>
</template>

<script>
    import InputText from '_c/input-text';
    import Tables from '_c/tables';
    import tableColumns from './table-columns';

    export default {
        name: 'LogSetting',
        components: {
            InputText,
            Tables
        },
        data() {
            return {
                loading: false,
                tableData: []
            };
        },
        computed: {
            columns() {
                return tableColumns.columns(this);
            },
        },
        methods: {
            //保存微应用设置
            handleSaveDingtalk() {
            }
        }
    };
</script>

<style scoped>
    .pp {
        font-size: 20px;
    }
</style>
